package com.scut.dispatching_server.tool;
import com.scut.dispatching_server.model.RLTransferOrderValueState;

import java.util.ArrayList;
import java.util.concurrent.Callable;

/**
 * ValueFunctionPostThread
 *
 * @author yuxi
 * @date 2019-05-06
 */
public class ValueFunctionPostThread implements Callable<ArrayList<RLTransferOrderValueState>> {
    private ArrayList<String> orderIds;
    private ArrayList<String> waitingRounds;
    private ArrayList<String> driverIds;
    private String globalTimeStamp;
    public ValueFunctionPostThread(ArrayList<String> orderIds, ArrayList<String> waitingRounds, ArrayList<String> driverIds, String globalTimeStamp){
        this.orderIds = orderIds;
        this.waitingRounds = waitingRounds;
        this.driverIds = driverIds;
        this.globalTimeStamp = globalTimeStamp;
    }
    @Override
    public ArrayList<RLTransferOrderValueState> call() throws Exception{
        ValueFunctionPredictor valueFunctionPredictor = new ValueFunctionPredictor();
        return valueFunctionPredictor.getValueFunction(orderIds, waitingRounds, driverIds, globalTimeStamp);
    }
}